const global = getApp().globalData;
const wxApi = global.wxApi;
const attentionModes = require('../../config/attentionModes');

Page({
  data: {
    modes: attentionModes
  },
  onLoad() {
    wxApi.setNavTitle( '专注力训练' )
  },
  onUnload() {
    console.log('on unload');
  },
  onSelectMode( e ) {
    let mode = e.currentTarget.dataset.mode;
    let path = '../attention-mode/attention-mode'
    wxApi.navigateTo( path, {
      mode: mode
    } )
  }
}) 
    